package com.ws.drawingsoftware.entity;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * @author 王硕
 * @version jdk21
 * @className Rectangle
 * @description
 * @date 2024/11/11 17:25
 */
@Setter
@Getter
public class Rectangle extends Shape{
    //长度,宽度
    private int length, width;
    @Override
    public void draw() {
        System.out.println("矩形的X坐标:"+super.getX());
        System.out.println("矩形的y坐标:"+super.getX());
        System.out.println("矩形的图案颜色:"+super.getColor());
        System.out.println("矩形的长度:"+this.getLength());
        System.out.println("矩形的宽度:"+this.getWidth());
        System.out.println("矩形的面积:"+(this.getLength()*this.getWidth()));
    }
}
